<?php
include_only();

$upload_youtube_video = "
<form action='index.php' method='get'>
<label>youtube video link: <input type='text' name='youtube_video_link' value='http://' style='width:420px' onClick=\"select()\" /></label>
<input type='submit' value='Add Video'/>
<input type='hidden' name='youtube_upload' value='yes'/>
<input type='hidden' name='page' value='video_uploader'>
</form>
";

//////////////////////////////////////////////////////////////
$ffmpeg_path = read_option('ffmpeg_path');

$ffmpeg = trim(shell_exec('type -P ' . $ffmpeg_path));

//if (!empty($ffmpeg)) {echo 'Installed!';} else {echo 'Not Installed!';}

/*
if (!empty($ffmpeg)) 
{
$upload_local_video = "
<form enctype=\"multipart/form-data\" action=\"video_uploader.php\" method=\"POST\">
<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"100000000\" />
Choose a file to upload: <input name=\"uploadedfile\" type=\"file\" /><br />
<input type=\"submit\" value=\"Upload File\" />
<input type='hidden' name='direct_upload' value='yes'>
</form>
		<br /><div id=\"progressbar\"></div>
";
}
else
{
$upload_local_video = "can't find ffmpeg pathm, please edit ffmpeg path in admin control panel activate this function.";
}
*/
//////////////////////////////////////////////////////////////

if (!empty($ffmpeg)) 
{
$upload_remote_video = "
<form action='index.php' method='get'>
<label>remote video link: http://wwww.example.com/video.avi
<input type='text' name='remote_video_link' value='http://' style='width:420px' onClick=\"select()\" /></label>
<br>
<label>remote video title:
<br>
<input type='text' name='remote_video_title' style='width:420px' onClick=\"select()\" /></label>
<br>
<label>remote video description:
<br>
<textarea name='remote_video_desc' style='width:420px' ></textarea></label>
<input type='submit' value='Add Video'/>
<input type='hidden' name='remote_upload' value='yes'/>
<input type='hidden' name='page' value='video_uploader'>
</form>
";
}
else
{
$upload_remote_video = "can't find ffmpeg path, please edit ffmpeg path in admin control panel to activate this function.";
}

?>


<!--
		<script type="text/javascript">
					$(function(){	
				// Progressbar
				$("#progressbar").progressbar({
					value: 0 
				});				
			});
		</script>
-->